/**
 * 
 */
package lt.vin.exaatto.client;

import lt.vin.exaatto.client.ui.ChatManagerUI;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.gdata.client.GData;
import com.google.gwt.gdata.client.GDataSystemPackage;
import com.google.gwt.user.client.ui.RootPanel;

/**
 * @author Vincentas
 * 
 */
public class ChatApp implements EntryPoint {

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.google.gwt.core.client.EntryPoint#onModuleLoad()
	 */
	@Override
	public void onModuleLoad() {
		if (!GData.isLoaded(GDataSystemPackage.CONTACTS)) {
			String exaAttoKey = "ABQIAAAAj6N1wGgGpuuqxjU6PcoKRxTnIibpEEiq8Vty39r1AQhCj4sZgBRZAm8W9Gg071RhPnKRB-wmAU16rg";
			String localhostKey = "ABQIAAAAj6N1wGgGpuuqxjU6PcoKRxT2yXp_ZAY8_ufC3CFXhHIE1NvwkxQCuZ2f9FcUf3Kd5Yh17KUSHtrfNA";
			GData.loadGDataApi(localhostKey, new Runnable() {
				public void run() {
					RootPanel.get("Content").add(new ChatManagerUI());
				}
			}, GDataSystemPackage.CONTACTS);
		} else {
			RootPanel.get("Content").add(new ChatManagerUI());
		}

	}
}
